<body>
    <div class="table-responsive">
        <table class="table table-hover">
            <thead>
                <tr>
                    <td>编号</td>
                    <td>用户名</td>
                    <td>类型</td>
                    <td>状态</td>
                    <td>更多</td>
                    <td>发生时间</td>
                </tr>
            </thead>
            <tbody>
                <?php foreach($event AS $value): ?>
                    <?php if ($value->result == $this->user->RESULT_PASS) continue; ?>
                    <tr>
                        <td><?=$value->id?></td>
                        <td><?=$value->username?></td>
                        <td><?=$this->user->TYPE_STR[$value->type]?></td>
                        <td><?=$this->user->RESULT_STR[$value->result]?></td>
                        <td>
                            <?php 
                                $data = unserialize($value->addition); 
                                foreach($data AS $key => $row) {
                                    if (isset($row->spid)) {
                                        //楼中楼
                                        echo "<a target='_blank' href='http://tieba.baidu.com/p/{$row->tid}?pid={$row->pid}&cid={$row->spid}#{$row->spid}'>[{$key}]</a>";
                                    } else {
                                        //帖子
                                        echo "<a target='_blank' href='http://tieba.baidu.com/p/{$row->tid}?pid={$row->pid}&cid=0#{$row->pid}'>[{$key}]</a>";
                                    }
                                    if ($key % 10 == 9)
                                        echo '<br/>';
                                }
                            ?>
                        </td>
                        <td><?=$value->time?></td>
                    </tr>
                <?php endforeach;?> 
            </tbody>
        </table>
    </div>
</body>
